package com.wangjw.demo;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by wangjw on 18/6/14.
 */
public class Consumer {

    public static void main(String[] args) {
        System.setProperty("java.net.preferIPv4Stack", "true");

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"spring/consumer-demo.xml"});
        context.start();

        DemoService demoService = (DemoService) context.getBean("demoService");
        String hello = demoService.sayHello("world");
        System.out.println(hello);
    }
}
